/*
 * @Author: 
 * @Date: 2022-01-25 17:31:23
 * @LastEditors: lqj
 * @LastEditTime: 2022-02-14 14:47:18
 * @Description: 请填写简介
 */
import React from 'react';
import ReactDOM from 'react-dom';
import {BrowserRouter} from 'react-router-dom'
import App from './App'
import './assets/styles/index.less'
import store from './redux/store'
import { Provider } from 'react-redux'
// store.subscribe(() => {
//   ReactDOM.render(
//     <BrowserRouter basename='/react'>
//       <App />
//     </BrowserRouter>,
//     document.getElementById('root')
//   )
// })

ReactDOM.render(
  /**
   * basename: 添加路由静态前缀
   * forceRefresh: 切换路由时刷新
   * getUserConfirmation：确认跳转信息
   * keyLength： key的长度
   * */ 
  <BrowserRouter
    basename='/react'
  >
    {/* 向下传递store */}
    <Provider store={store}>
      <App />
    </Provider>
  </BrowserRouter>,
  document.getElementById('root')
)